Optimal. Leaf size=97 \[ \frac {a A \sin (c+d x)}{d}+\frac {(A b+a B) \sin ^2(c+d x)}{2 d}-\frac {(a A-b B) \sin ^3(c+d x)}{3 d}-\frac {(A b+a B) \sin ^4(c+d x)}{4 d}-\frac {b B \sin ^5(c+d x)}{5 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 97, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.069, Rules used = {2916, 786}
\begin {gather*} -\frac {(a B+A b) \sin ^4(c+d x)}{4 d}-\frac {(a A-b B) \sin ^3(c+d x)}{3 d}+\frac {(a B+A b) \sin ^2(c+d x)}{2 d}+\frac {a A \sin (c+d x)}{d}-\frac {b B \sin ^5(c+d x)}{5 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 786
Rule 2916
Rubi steps
\begin {align*} \int \cos ^3(c+d x) (a+b \sin (c+d x)) (A+B \sin (c+d x)) \, dx &=\frac {\text {Subst}\left (\int (a+x) \left (A+\frac {B x}{b}\right ) \left (b^2-x^2\right ) \, dx,x,b \sin (c+d x)\right )}{b^3 d}\\ &=\frac {\text {Subst}\left (\int \left (a A b^2+b (A b+a B) x-(a A-b B) x^2-\frac {(A b+a B) x^3}{b}-\frac {B x^4}{b}\right ) \, dx,x,b \sin (c+d x)\right )}{b^3 d}\\ &=\frac {a A \sin (c+d x)}{d}+\frac {(A b+a B) \sin ^2(c+d x)}{2 d}-\frac {(a A-b B) \sin ^3(c+d x)}{3 d}-\frac {(A b+a B) \sin ^4(c+d x)}{4 d}-\frac {b B \sin ^5(c+d x)}{5 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.26, size = 80, normalized size = 0.82 \begin {gather*} \frac {\sin (c+d x) \left (60 a A+30 (A b+a B) \sin (c+d x)-20 (a A-b B) \sin ^2(c+d x)-15 (A b+a B) \sin ^3(c+d x)-12 b B \sin ^4(c+d x)\right )}{60 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.30, size = 88, normalized size = 0.91
method | result | size |
derivativedivides | \(\frac {B b \left (-\frac {\left (\cos ^{4}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{5}+\frac {\left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{15}\right )-\frac {A b \left (\cos ^{4}\left (d x +c \right )\right )}{4}-\frac {a B \left (\cos ^{4}\left (d x +c \right )\right )}{4}+\frac {a A \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}}{d}\) | \(88\) |
default | \(\frac {B b \left (-\frac {\left (\cos ^{4}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{5}+\frac {\left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{15}\right )-\frac {A b \left (\cos ^{4}\left (d x +c \right )\right )}{4}-\frac {a B \left (\cos ^{4}\left (d x +c \right )\right )}{4}+\frac {a A \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}}{d}\) | \(88\) |
risch | \(\frac {3 a A \sin \left (d x +c \right )}{4 d}+\frac {b B \sin \left (d x +c \right )}{8 d}-\frac {\sin \left (5 d x +5 c \right ) B b}{80 d}-\frac {\cos \left (4 d x +4 c \right ) A b}{32 d}-\frac {a \cos \left (4 d x +4 c \right ) B}{32 d}+\frac {a A \sin \left (3 d x +3 c \right )}{12 d}-\frac {\sin \left (3 d x +3 c \right ) B b}{48 d}-\frac {\cos \left (2 d x +2 c \right ) A b}{8 d}-\frac {a \cos \left (2 d x +2 c \right ) B}{8 d}\) | \(140\) |
norman | \(\frac {\frac {\left (2 A b +2 a B \right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {\left (2 A b +2 a B \right ) \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {8 \left (2 a A +B b \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}+\frac {8 \left (2 a A +B b \right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}+\frac {4 \left (25 a A -4 B b \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{15 d}+\frac {2 \left (A b +a B \right ) \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {2 \left (A b +a B \right ) \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {2 a A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {2 a A \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}\) | \(219\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 80, normalized size = 0.82 \begin {gather*} -\frac {12 \, B b \sin \left (d x + c\right )^{5} + 15 \, {\left (B a + A b\right )} \sin \left (d x + c\right )^{4} + 20 \, {\left (A a - B b\right )} \sin \left (d x + c\right )^{3} - 60 \, A a \sin \left (d x + c\right ) - 30 \, {\left (B a + A b\right )} \sin \left (d x + c\right )^{2}}{60 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 70, normalized size = 0.72 \begin {gather*} -\frac {15 \, {\left (B a + A b\right )} \cos \left (d x + c\right )^{4} + 4 \, {\left (3 \, B b \cos \left (d x + c\right )^{4} - {\left (5 \, A a + B b\right )} \cos \left (d x + c\right )^{2} - 10 \, A a - 2 \, B b\right )} \sin \left (d x + c\right )}{60 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.27, size = 128, normalized size = 1.32 \begin {gather*} \begin {cases} \frac {2 A a \sin ^{3}{\left (c + d x \right )}}{3 d} + \frac {A a \sin {\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} - \frac {A b \cos ^{4}{\left (c + d x \right )}}{4 d} - \frac {B a \cos ^{4}{\left (c + d x \right )}}{4 d} + \frac {2 B b \sin ^{5}{\left (c + d x \right )}}{15 d} + \frac {B b \sin ^{3}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{3 d} & \text {for}\: d \neq 0 \\x \left (A + B \sin {\left (c \right )}\right ) \left (a + b \sin {\left (c \right )}\right ) \cos ^{3}{\left (c \right )} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.52, size = 100, normalized size = 1.03 \begin {gather*} -\frac {12 \, B b \sin \left (d x + c\right )^{5} + 15 \, B a \sin \left (d x + c\right )^{4} + 15 \, A b \sin \left (d x + c\right )^{4} + 20 \, A a \sin \left (d x + c\right )^{3} - 20 \, B b \sin \left (d x + c\right )^{3} - 30 \, B a \sin \left (d x + c\right )^{2} - 30 \, A b \sin \left (d x + c\right )^{2} - 60 \, A a \sin \left (d x + c\right )}{60 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 11.99, size = 83, normalized size = 0.86 \begin {gather*} -\frac {\frac {B\,b\,{\sin \left (c+d\,x\right )}^5}{5}+\left (\frac {A\,b}{4}+\frac {B\,a}{4}\right )\,{\sin \left (c+d\,x\right )}^4+\left (\frac {A\,a}{3}-\frac {B\,b}{3}\right )\,{\sin \left (c+d\,x\right )}^3+\left (-\frac {A\,b}{2}-\frac {B\,a}{2}\right )\,{\sin \left (c+d\,x\right )}^2-A\,a\,\sin \left (c+d\,x\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________